const hero = {
  name: 'fanchao',
  height: 175
}
observe(hero)
function observe(data) {
  Object.keys(data).forEach(key => {
    defineReactive(data, key, data[key])
  })
}
function defineReactive(data, key, val){
  Object.defineProperty(data, key, {
    enumerable: true, // 可枚举
    configurable: false, // 不能再define
    get: function () {
      console.log('getVal:', val)
      return val
    },
    set: function (newVal) {
      console.log('setVal', newVal)
      val = newVal
    }
  })
}
hero.name = 'fan'
hero.name
console.log('console')
